import axios from "../utils/request.js";

//角色绑定
export function BindRole(data) {
    return axios({
        method: "get",
        url: "Role/GetRoleList",
        data: data,
    })
}
//角色列表
export function RoleInfo(data) {
    return axios({
        method: "get",
        url: "Role/GetRoleInfo",
        params: {
            roleId: data.roleId,
            userName: data.userName,
            pageIndex: data.pageIndex,
            pageSize: data.pageSize,
        },
    });
}
//角色删除--逻辑删除
export function RoleDel(data) {
    return axios({
        method: "delete",
        url: "Role/DeleteRoleInfo?id="+data,
        data: data,
    });
}
//角色添加
export function InsertRole(data) {
    return axios({
        method: "post",
        url: "Role/AddRoleInfo",
        data: data
    });
}
//角色反显
export function editRoleById(data) {
    return axios({
        method: "get",
        url: "Role/RoleQueryById?id="+data,
    });
}
//角色修改
export function editRole(data) {
    return axios({
        method: "put",
        url: "Role/UpdRoleInfo",
        data: data
    });
}   

